home *** CD-ROM | disk | FTP | other *** search
/ Merciful 5 / Merciful - Disc 5.iso / software / p / pcqpascalv1.2d.lha / Include / DOS / Notify.i < prev    next >
Text File  |  1997-05-06  |  3KB  |  89 lines

  1.  
  2. {$I   "Include:Exec/Types.i"}
  3. {$I   "Include:Exec/Ports.i"}
  4. {$I   "Include:Exec/Tasks.i"}
  5.  
  6.  
  7.  
  8. CONST
  9. {     use of Class and code is discouraged for the time being - we might want to
  10.    change things }
  11. {     --- NotifyMessage Class ------------------------------------------------ }
  12.      NOTIFY_CLASS  =  $40000000;
  13.  
  14. {     --- NotifyMessage Codes ------------------------------------------------ }
  15.      NOTIFY_CODE   =  $1234;
  16.  
  17.  
  18. {     Sent to the application if SEND_MESSAGE is specified.                    }
  19.  
  20. Type
  21. {     Do not modify or reuse the notifyrequest while active.                   }
  22. {     note: the first LONG of nr_Data has the length transfered                }
  23.  
  24.     nr_Msg = Record
  25.      nr_Port : MsgPortPtr;
  26.     END;
  27.     nr_MsgPtr = ^nr_Msg;
  28.  
  29.     nr_Signal = Record
  30.      nr_Task : TaskPtr;
  31.      nr_Signalnum : Byte;
  32.      nr_pad : Array[0..2] of Byte;
  33.     END;
  34.     nr_SignalPtr = ^nr_Signal;
  35.  
  36.        NotifyRequest = Record
  37.         nr_Name,
  38.         nr_FullName :  String;             {     set by dos - don't touch }
  39.         nr_UserData,                       {     for applications use }
  40.         nr_Flags    : Integer;
  41.         nr_stuff    : Array[0..7] of Byte;
  42.         nr_Reserved : Array[0..3] of Integer;           {     leave 0 for now }
  43.  
  44.         {     internal use by handlers }
  45.         nr_MsgCount : Integer;              {     # of outstanding msgs }
  46.         nr_Handler  : MsgPortPtr;           {     handler sent to (for EndNotify) }
  47.        END;
  48.        NotifyRequestPtr = ^NotifyRequest;
  49.  
  50.    NotifyMessage = Record
  51.     nm_ExecMessage : Message;
  52.     nm_Class       : Integer;
  53.     nm_Code        : Short;
  54.     nm_NReq        : NotifyRequestPtr;   {     don't modify the request! }
  55.     nm_DoNotTouch,                       {     like it says!  For use by handlers }
  56.     nm_DoNotTouch2 : Integer;            {     ditto }
  57.    END;
  58.    NotifyMessagePtr = ^NotifyMessage;
  59.  
  60.  
  61. CONST
  62. {     --- NotifyRequest Flags ------------------------------------------------ }
  63.      NRF_SEND_MESSAGE      =  1 ;
  64.      NRF_SEND_SIGNAL       =  2 ;
  65.      NRF_WAIT_REPLY        =  8 ;
  66.      NRF_NOTIFY_INITIAL    =  16;
  67.  
  68. {     do NOT set or remove NRF_MAGIC!  Only for use by handlers! }
  69.      NRF_MAGIC             = $80000000;
  70.  
  71. {     bit numbers }
  72.      NRB_SEND_MESSAGE      =  0;
  73.      NRB_SEND_SIGNAL       =  1;
  74.      NRB_WAIT_REPLY        =  3;
  75.      NRB_NOTIFY_INITIAL    =  4;
  76.  
  77.      NRB_MAGIC             =  31;
  78.  
  79. {     Flags reserved for private use by the handler: }
  80.      NR_HANDLER_FLAGS      =  $ffff0000;
  81.  
  82.  
  83. PROCEDURE EndNotify(NR : NotifyRequestPtr);
  84.     External;
  85.  
  86. FUNCTION StartNotify(nr : NotifyRequestPtr) : Boolean;
  87.     External;
  88.  
  89.